import request from "@/utils/request";

// 查询列表
export function bpList(query) {
  return request({
    url: "/mall/cooperation/channel/list",
    method: "get",
    params: query,
  });
}
// 新增
export function addBp(data) {
  return request({
    url: "/mall/cooperation/channel",
    method: "post",
    data,
  });
}
// 编辑
export function editBp(data) {
  return request({
    url: "/mall/cooperation/channel",
    method: "put",
    data,
  });
}
// 删除
export function delBp(id) {
  return request({
    url: "/mall/cooperation/channel/" + id,
    method: "delete",
  });
}
// 详情
export function getBp(id) {
  return request({
    url: "/mall/cooperation/channel/" + id,
    method: "get",
  });
}

//全部渠道列表
export function allChannelList() {
  return request({
    url: "/mall/cooperation/channel/showList",
    method: "get",
  });
}
//查看关联分类
export function getChannelCategory(id) {
  return request({
    url: "/mall/cooperation/channel/category/" + id,
    method: "get",
  });
}
//查看所有分类
export function getAllCategory() {
  return request({
    url: "/commodity/category/showProductCategory",
    method: "get",
  });
}
//提交关联分类
export function submitCategoryProxy(id, data) {
  return request({
    url: "/mall/cooperation/channel/category/" + id,
    method: "post",
    data,
  });
}
